{% for reply in replies %}
    {% set userUrl = path('user_view', {'username': reply.user.username}) %}
    <li class="list-group-item media reply" data-role="reply" data-reply-id="{{ reply.id }}"  data-username="{{ reply.user.username }}">
        <div class="media-left">
            <a href="{{ userUrl }}" class="avatar"><img src="{{ asset(reply.user.avatar)|imagine_filter('middle_square') }}" class="media img-responsive img-circle"></a>
        </div>
        <div class="media-body">
            <div class="media-heading">
                <a href="{{ userUrl }}" class="username">{{ reply.user.username }}</a>
                <span class="publish-at">{{ reply.createdAt|time_diff }}</span>
                <ul class="list-unstyled list-inline meta">
                    <li>#{{ loop.index }}</li>
                    <li><span class="reply-user" data-action="mention"><i class="if i-reply" title="回复TA"></i></span></li>
                    {% if is_granted('edit', reply) %}
                        <li><a href="javascript:void(0);" class="remove" data-action="remove"><i class="if i-trash" title="删除"></i></a></li>
                    {% endif %}
                </ul>
            </div>
            <div class="body markdown-body">{{ reply.body|raw }}</div>
        </div>
    </li>
{% endfor %}